It is requested that an application detects in real time from a large amount of data generated by a data generation device that data satisfies a certain condition, and a timely service can be realized. For example, there is a service devised so that a temperature sensor applied to a fruit provides temperature information at any time, a storage agent is immediately notified if a predetermined period in which a predetermined temperature continues for a predetermined time passes and the fruit becomes older and has lost its product value, thereby prompting an appropriate process to be performed. To attain this, the application uses an event detection device.
FIG. 14 is an example of the configuration of a common event detection device. An event detection device 1401 receives a setting of an event notification (event notification condition) from an application 1402, detects data matching the notification condition in a large amount of data generated by a data generation device 1403, and notifies the application of the information in real time as an event. In this case, the notification condition refers to a condition to be satisfied by the data generated by the data generation device 1403 when the application 1402 is notified that the data generation device 1403 has entered a predetermined state.
Normally, a service provider perform an application with a redundant configuration to improve the availability of a service. When a timely service is realized, it is disabled if an event notification is delayed. Therefore, it is necessary to configure a redundant event detection device so that an application can receive an event using another event detection device although a fault occurs in one event detection device. In addition, when one event detection device inherits an event detecting process of another event detection device, care is to be taken not to omit an event to be transmitted.
A generally well known redundant system uses a load balancer. FIG. 15 illustrates a configuration of a conventional technology of a redundant event detection system using a load balancer. With the configuration, a load balancer 1502 is arranged between a data generation device 1503 and two event detection devices 1501 (#1) and (#2) to monitor the active/inactive state of the event detection device 1501. Then, it normally transmits data to the event detection device 1501 #1, and an event detection device 1501 #1 issues a notification to an application (“APPLICATION” in FIG. 15) 1504. When an abnormal condition occurs in the event detection device 1501 #1, data is transmitted to the event detection device 1501 #2, and the event detection device 1501 #2 issues a notification to the application 1504, and the event detecting process is continued.
The event detection device 1501 has an internal state for comparison between received data and the notification condition to speedup the detecting and notifying process. The internal state refers to a transition state of data from the data generation device 1503 managed by the event detection device 1501 for each notification condition. In this case, the redundant system as illustrated in FIG. 15 cannot be applied. For example, when an event is notified if the condition of continuing the temperature of or above 20° C. for two or more minutes is satisfied, it is necessary to hold the state for the past two minutes as an internal state. However, although an abnormal condition occurs in the event detection device 1501 #1 and the event detection device 1501 #2 is to inherit the event detecting process, a different internal state prevents a correct notification determination as is.
When the detecting and notifying process is inherited, a method of copying an internal state can be used. However, during the process of copying the internal state, data is continuously generated, and the internal state does not stay in the same condition after the copying process is completed. In addition, when an abnormal condition occurs in the event detection device, the internal state is not necessarily copied.
To solve the problem above, the event detection system illustrated in FIGS. 16A and 16B is considered. A data generation device 1603 transmits the same data to two event detection devices, and maintain the internal state of the two event detection devices 1601 (#1) and (#2) constantly in the same conditions. Data transmission means can be multicast or repetitive unicast. Practically, a notification of an event is transmitted to an application (described as “APPLICATION” in FIGS. 16A and 16B) 1604 by only an event detection device 1601 in the operative state. For example, in the example in FIG. 16A, the event detection device 1601 #1 is in the operative state, that is, acts as an operative system. The event detection device 1601 in the standby state internally performs the event generating process, holds the history, but does not issues a notification to the application 1604. In the example in FIG. 16A, the event detection device 1601 #2 is in the standby state, that is acts as a standby system. Normally, the operative event detection device 1601 notifies the application 1604 of an event through the event relay device 1602, and the event relay device 1602 keeps the history of the events notified to the application 1604. On the other hand, the standby event detection device 1601 periodically confirms whether or not the operative event detection device 1601 is operating. As illustrated in FIG. 16B, when the standby event detection device 1601 detects an abnormal condition, the device inquires of the event relay device 1602 about the history, and compares it with the event generation history accumulated in the standby event detection device 1601. The standby event detection device 1601 designates an event generated as an event but not actually notified to the application 1604, notifies an application of the event, enters in the operative system, and starts a normal event notifying process. Thus, when the event notifying process transfers from an operative system to a standby system, an event notification is made from the point where an abnormal condition occurs in the operative system, thereby preventing the omission of an event notification.
In this case, the important point is an event notifying method. Normally considered can be a method of using as an identifier the order of data input to the event detection device, and a method of using as an identifier the order of generating events. However, there are the following problems with the event notification.
When the order of input data is used as an identifier:
A plurality of events can occur with respect to one piece of input data, and an event cannot be identified using the order of the input data.
For example, in FIG. 17A, assume that under the same notification condition of “keeping the temperature of 20° C. or more for one minute or longer” for applications (described as “APPLICATION” in FIGS. 17A and 17B) 1703 (#1) and (#2), an event notification is set in each of the applications. Also assume that the data of 17° C. at 12:00 and 21° C. at 12:01 are received as the internal state of an event detection device 1701. Then, if the event detection device 1701 receives the data of 20° C. at 12:02, the notification conditions of the applications 1703 #1 and #2 are satisfied. Therefore, the same event is notified to both of the applications. Accordingly, an event cannot be identified only by identifying the order of the input data to the event detection device 1701, and it cannot be determined which event notification has failed when an abnormal condition occurs.
When the order of generating an event is used:
Since the event notifying process is performed by multithreading, an event notification message is not always generated in the same order in a plurality of event detection devices.
For example, in FIG. 17B, assume that an application 1706 #3 sets an event notification under the notification condition of “keeping the temperature of 20° C. or more for one minute or longer”. Also assume that the same data are received from event detection devices 1704 (#1) and (#2) and a data generation device 1705, and the internal states are 17° C. at 12:00 and 21° C. at 12:01 for a sensor #1, and 18° C. at 12:00 and 20° C. at 12:01 for a sensor #2. When the data of 20° C. for the sensor #1 and 21° C. for the sensor #2 as the information at 12:02 are transmitted to an event detection device 1704 at the substantially same time, abnormal temperature events about the sensors #1 and #2 are generated in both of the event detection devices 1704. In this case, since the data of the sensors #1 and #2 are processed in parallel, which sensor first completes generating an event depends on the state of the event detection device 1704. Therefore, an event cannot be identified by the order of generating events.
There is a prior art of a storage system provided with a duplex volume and a replicate volume in identifying an event, in which when a replicating process is interrupted by a fault of a primary master volume, a secondary master volume immediately inherits the replicating process. The prior art solves the problem that since the primary and secondary master volumes are independent of each other, the secondary system cannot know in which process the primary system has been interrupted, thereby failing in correctly inheriting the interrupted replication of data. Therefore, a server transmits the same write data to both of the primary system and the secondary system. The primary system and the secondary system assign a number to a write request from the server, update the contents of their own logical disks, and hold the update histories. Only the primary system performs the replicating process on the replicate volume, and allows the replicate volume to store the number of completed process. When a fault occurs in the primary system, and the secondary system inherits the process, the replicate volume is inquired about the number of the completed process, and the replicating process is resumed immediately after the last completed process. In this method, since the same data is transmitted to both master volumes, they can maintain the same internal state, and an incomplete replicating process can be performed by comparing the history of the replicate volume with the histories of the master volumes when the process is inherited.
In this prior art, a write request to the storage is input and a write request to the replicate volume is output, the input corresponds one-to-one to the output, and the order of the output is supposed to match the order of the input. Therefore, by assigning a number when a write request is received, a write request to the replicate volume can be identified.
However, when the above-mentioned event notification is made, the data from the data generation device does not necessarily correspond one-to-one to the data to the application. Therefore, the above-mentioned prior art cannot be applied.
Japanese Laid-open Patent Publication No. 2006-285336 and Japanese Laid-open Patent Publication No. 2001-045021 are disclosed as a prior art relating to the technology disclosed by the present application.